/* tripl/arch/x86_64/do_keyword.c 
 * 
 * This file is part of tripl. 
 * 
 * tripl is free software: you can redistribute it and/or modify 
 * it under the terms of the GNU General Public License as published by 
 * the Free Software Foundation, either version 3 of the License, or 
 * (at your option) any later version. 
 * 
 * tripl is distributed in the hope that it will be useful, 
 * but WITHOUT ANY WARRANTY; without even the implied warranty of 
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
 * GNU General Public License for more details. 
 * 
 * You should have received a copy of the GNU General Public License 
 * along with tripl. If not, see <https://www.gnu.org/licenses/>
 */ 




/* gas x86_64 assembly, to stdout */

#include <stdio.h>

#include <klist.h>
#include <tripl/tripl.h>
#include <tripl/limits.h>
#include <tripl/arch.h>


int x86_64_init(void);
int x86_64_fin(void);

int x86_64_new_var(char *name, long value, int attr);


struct arch x86_64_arch_fn = {
	.arch_init = x86_64_init, 
	.arch_fin = x86_64_fin, 
	.arch_new_var = x86_64_new_var, 
	.arch_stack_dump = NULL, 
	.arch_import_shared = NULL, 
	.arch_funcall = NULL, 
	.arch_set_var = NULL
};


extern int x86_64_init_asm(void);
extern int x86_64_asm_fin(void);


__arch int x86_64_init(void) {
	klist_init(&stack);

	return x86_64_init_asm();
}


__arch int x86_64_fin(void) {
	x86_64_asm_fin();

	return 0;
}


